package com.example.shop.fgo.task.upload.model;

import org.xutils.DbManager;

/**
 * Created by Administrator on 2017/2/20.
 */

public class UploadDaoConfig {
    
    
    private static DbManager.DaoConfig mDaoConfig;
    
    public static DbManager.DaoConfig getUploadDaoConfig() {
        
        //优化效率
        if(mDaoConfig==null){
            //处理了线程安全问题
            synchronized (UploadDaoConfig.class) {
                if (mDaoConfig == null) {
                    mDaoConfig = new DbManager.DaoConfig();
                    mDaoConfig.setDbName("uploadDB");
                    mDaoConfig.setDbVersion(1);
//                    mDaoConfig.setDbUpgradeListener(new DbManager.DbUpgradeListener() {
//                        @Override
//                        public void onUpgrade(DbManager db, int oldVersion, int newVersion) {
//        
//                        }
//                    })
                }
            }
        }
        
        return mDaoConfig;
    }
}
